import { createApp } from 'vue'
import './assets/main.css'
import App from './App.vue'
import router from "@/router/index.ts";
import "@/styles/index.scss";
// import xqElement from "../dist/es/xq-element.js";

const app = createApp(App);


import { library } from '@fortawesome/fontawesome-svg-core'

/* import font awesome icon component */
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'

/* import fas icons */
import { fas } from '@fortawesome/free-solid-svg-icons'
library.add(fas);

// 引入自定义组件
import XqIcon from "@/components/Icon/Icon.vue";
import XqButton from "@/components/Button";
import XqCard from "@/components/Card/Card.vue";

const componentsArr = [XqIcon, XqButton, XqCard];

componentsArr.forEach(component => {
    app.component(component.name, component);
})
app.component('font-awesome-icon', FontAwesomeIcon);


// app.use(xqElement);
app.use(router);
app.mount('#app');
